package com.weixin.entity;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.weixin.common.BaseEntity;

/**
 * 角色实体类
 */
public class BgRight extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;

	// alias
	public static final String TABLE_ALIAS = "TbBgRight";
	public static final String ALIAS_NRIGHT_ID = "nrightId";
	public static final String ALIAS_SNAME = "sname";
	public static final String ALIAS_SREMARK = "sremark";
	public static final String ALIAS_NIS_VALID = "1-有效；2-无效";

	/**
	 * nrightId db_column: nRightId
	 */
	private java.lang.Integer nrightId;
	/**
	 * sname db_column: sName
	 */
	private java.lang.String sname;
	/**
	 * sremark db_column: sRemark
	 */
	private java.lang.String sremark;
	/**
	 * 1-有效；2-无效 db_column: nIsValid
	 */
	private Integer nisValid;

	// columns END

	// 注意： spring_jdbc的MetadataCreateUtils.fromTable(Entity.class) 可以读取JPA
	// annotation的标注信息
	// 现支持 @Id,@Column,@Table标注

	public BgRight() {
	}

	public BgRight(java.lang.Integer nrightId) {
		this.nrightId = nrightId;
	}

	public java.lang.Integer getNrightId() {
		return this.nrightId;
	}

	public void setNrightId(java.lang.Integer value) {
		this.nrightId = value;
	}

	public java.lang.String getSname() {
		return this.sname;
	}

	public void setSname(java.lang.String value) {
		this.sname = value;
	}

	public java.lang.String getSremark() {
		return this.sremark;
	}

	public void setSremark(java.lang.String value) {
		this.sremark = value;
	}

	public Integer getNisValid() {
		return this.nisValid;
	}

	public void setNisValid(Integer value) {
		this.nisValid = value;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("NrightId", getNrightId()).append("Sname", getSname())
				.append("Sremark", getSremark()).append("NisValid",
						getNisValid()).toString();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(getNrightId()).toHashCode();
	}

	public boolean equals(Object obj) {
		if (obj instanceof BgRight == false)
			return false;
		if (this == obj)
			return true;
		BgRight other = (BgRight) obj;
		return new EqualsBuilder().append(getNrightId(), other.getNrightId())
				.isEquals();
	}
}
